From: Jakub Steiner Date: Wed, 15 Jun 2022 12:47:47 +0000 (+0200) Subject: HC: make selected items better visible X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~81^2^2~120^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dd9f26c4920de20c73d1aa46f7d65dee0dbeb864;p=gtk4.git HC: make selected items better visible - follow libadwaita's example and outline selected items for better visibility in high contrast variant Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4984 --- diff --git a/gtk/theme/Default/_common.scss b/gtk/theme/Default/_common.scss index 0d992641f7..077eabc30b 100644 --- a/gtk/theme/Default/_common.scss +++ b/gtk/theme/Default/_common.scss @@ -89,6 +89,13 @@ iconview { @include focus-ring(); + @if $contrast == 'high' { + &:selected { + box-shadow: inset 0 0 0 1px $borders_color; + } + } + + &:drop(active) { box-shadow: none; } @@ -135,6 +142,11 @@ gridview { outline-color: $alt_focus_border_color; @extend %selected_items; + + @if $contrast == 'high' { + box-shadow: inset 0 0 0 1px $borders_color; + } + } box { //cells @@ -1947,7 +1959,13 @@ popover.menu { outline: none; transition: none; - &:selected { background: image($menu_selected_color); } + &:selected { + background: image($menu_selected_color); + + @if $contrast == 'high' { + box-shadow: inset 0 0 0 1px $borders_color; + } + } } } @@ -3624,6 +3642,11 @@ separator.sidebar { background-color: $menu_selected_color; color: inherit; + @if $contrast == 'high' { + box-shadow: inset 0 0 0 1px $borders_color; + } + + &:hover { background-color: darken($menu_selected_color,5%); } @@ -4269,6 +4292,10 @@ popover.emoji-picker emoji { &:focus, &:hover { background: $selected_bg_color; + + @if $contrast == 'high' { + box-shadow: inset 0 0 0 1px $borders_color; + } } }